IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'SagaUpdate')
	BEGIN
		DROP  Procedure  SagaUpdate
	END

GO

CREATE Procedure SagaUpdate
(
	@SagaID int,
	@TemplateStyle Int,
	@Name nvarchar(250) = NULL,
	@TagLine nvarchar(150) = NULL,
	@Header ntext = Null,
	@CurrentAffairs ntext = NULL,
	@SagaSummary ntext = NULL,
	@FormationStory ntext = NULL,
	@FoundedMonth int = NULL,
	@FoundedYear int = NULL,
	@CurrentYear int = NULL
)
AS
UPDATE Saga
SET @TemplateStyle = TemplateStyle,
	Name = @Name,
	TagLine = @TagLine,
	Header = @Header,
	CurrentAffairs = @CurrentAffairs,
	SagaSummary = @SagaSummary,
	FormationStory = @FormationStory,
	FoundedMonth = @FoundedMonth,
	FoundedYear = @FoundedYear,
	CurrentYear = @CurrentYear
Where SagaID = @SagaID
